Skip to content

auto-format#137

Merged
kevinbackhouse merged 1 commit intoGitHubSecurityLab:mainfrom
kevinbackhouse:fmt
Jan 27, 2026
Merged

auto-format#137
kevinbackhouse merged 1 commit intoGitHubSecurityLab:mainfrom
kevinbackhouse:fmt

Conversation

@kevinbackhouse
Copy link
Copy Markdown
Collaborator

I ran the auto-formatting tool:

hatch fmt

Copilot AI review requested due to automatic review settings January 26, 2026 12:33
#from mcp.server.fastmcp import FastMCP, Context
from fastmcp import FastMCP, Context # use FastMCP 2.0

# from mcp.server.fastmcp import FastMCP, Context

Check notice

Code scanning / CodeQL

Unused import Note

Import of 'Context' is not used.
def flush(self) -> None: ...


class Spec(object):

Check notice

Code scanning / CodeQL

Statement has no effect Note

This statement has no effect.
def write(self, b: str) -> int: ...

def flush(self) -> None:
...

Check notice

Code scanning / CodeQL

Statement has no effect Note

This statement has no effect.
def closed(self) -> bool: ...

def write(self, b: str) -> int:
...

Check notice

Code scanning / CodeQL

Statement has no effect Note

This statement has no effect.
def fileno(self) -> int: ...

@property
def closed(self) -> bool:

Check notice

Code scanning / CodeQL

Statement has no effect Note

This statement has no effect.
Comment on lines +16 to +30
from agents import (
Agent,
Runner,
AgentHooks,
RunHooks,
result,
function_tool,
Tool,
RunContextWrapper,
TContext,
OpenAIChatCompletionsModel,
set_default_openai_client,
set_default_openai_api,
set_tracing_disabled,
)

Check notice

Code scanning / CodeQL

Unused import Note

Import of 'function_tool' is not used.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request applies auto-formatting to the codebase using hatch fmt. The changes are entirely stylistic and do not alter the functionality of the code.

Changes:

  • Converted single quotes to double quotes throughout the codebase for string consistency
  • Reformatted multi-line function calls and definitions for better readability
  • Added/removed blank lines to comply with PEP 8 spacing guidelines (e.g., two blank lines between top-level definitions)
  • Adjusted line wrapping for long lines
  • Removed trailing whitespace and extra blank lines at the end of files

Reviewed changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
tests/test_yaml_parser.py Quote standardization and spacing improvements
tests/test_cli_parser.py Quote standardization and spacing improvements
tests/test_api_endpoint_config.py Quote standardization and spacing improvements
src/seclab_taskflow_agent/shell_utils.py Reformatted function calls and quote standardization
src/seclab_taskflow_agent/render_utils.py Reformatted function signatures and quote standardization
src/seclab_taskflow_agent/path_utils.py Reformatted function calls and spacing improvements
src/seclab_taskflow_agent/mcp_utils.py Extensive reformatting of multi-line function calls and quote standardization
src/seclab_taskflow_agent/mcp_servers/memcache/memcache_backend/sqlite.py Quote standardization and spacing improvements; contains pre-existing bug
src/seclab_taskflow_agent/mcp_servers/memcache/memcache_backend/sql_models.py Quote standardization and spacing improvements
src/seclab_taskflow_agent/mcp_servers/memcache/memcache_backend/dictionary_file.py Quote standardization and spacing improvements
src/seclab_taskflow_agent/mcp_servers/memcache/memcache_backend/backend.py Trailing whitespace removal
src/seclab_taskflow_agent/mcp_servers/memcache/memcache.py Quote standardization and spacing improvements
src/seclab_taskflow_agent/mcp_servers/logbook/logbook.py Quote standardization and spacing improvements
src/seclab_taskflow_agent/mcp_servers/echo/echo.py Quote standardization and spacing improvements
src/seclab_taskflow_agent/mcp_servers/codeql/mcp_server.py Extensive reformatting of multi-line function calls
src/seclab_taskflow_agent/mcp_servers/codeql/jsonrpyc/init.py Protocol method formatting and quote standardization
src/seclab_taskflow_agent/mcp_servers/codeql/client.py Extensive reformatting of multi-line function calls
src/seclab_taskflow_agent/env_utils.py Spacing improvements
src/seclab_taskflow_agent/capi.py Quote standardization and spacing improvements
src/seclab_taskflow_agent/available_tools.py Quote standardization and spacing improvements
src/seclab_taskflow_agent/agent.py Import formatting and multi-line function reformatting
src/seclab_taskflow_agent/main.py Extensive reformatting of imports and function calls
release_tools/publish_docker.py Reformatted function calls and spacing improvements
release_tools/copy_files.py Spacing improvements

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -28,7 +29,7 @@ def set_state(self, key: str, value: Any) -> str:
session.add(kv)
session.commit()
return 'f"Stored value in memory for `{key}`"'
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line contains a string that looks like it should be an f-string but is actually a regular string literal. The outer single quotes prevent this from being evaluated as an f-string. This should be:

return f"Stored value in memory for `{key}`"

Note: This appears to be a pre-existing bug that was not introduced by this formatting PR, but it should be fixed.

Suggested change
return 'f"Stored value in memory for `{key}`"'
return f"Stored value in memory for `{key}`"

Copilot uses AI. Check for mistakes.
inputs = task_body.get('inputs', {})
prompt = task_body.get('user_prompt', '')
name = task_body.get("name", "taskflow") # placeholder, not used yet
description = task_body.get("description", "taskflow") # placeholder not used yet
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variable description is not used.

Suggested change
description = task_body.get("description", "taskflow") # placeholder not used yet

Copilot uses AI. Check for mistakes.
run = task_body.get('run', '')
inputs = task_body.get('inputs', {})
prompt = task_body.get('user_prompt', '')
name = task_body.get("name", "taskflow") # placeholder, not used yet
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This assignment to 'name' is unnecessary as it is redefined before this value is used.

Suggested change
name = task_body.get("name", "taskflow") # placeholder, not used yet

Copilot uses AI. Check for mistakes.
def parse_prompt_args(available_tools: AvailableTools,
user_prompt: str | None = None):

def parse_prompt_args(available_tools: AvailableTools, user_prompt: str | None = None):
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

parse_prompt_args returns tuple of size 5 and tuple of size 6.
parse_prompt_args returns tuple of size 5 and tuple of size 6.

Copilot uses AI. Check for mistakes.
Comment on lines +16 to +30
from agents import (
Agent,
Runner,
AgentHooks,
RunHooks,
result,
function_tool,
Tool,
RunContextWrapper,
TContext,
OpenAIChatCompletionsModel,
set_default_openai_client,
set_default_openai_api,
set_tracing_disabled,
)
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Import of 'function_tool' is not used.

Copilot uses AI. Check for mistakes.
from fastmcp import FastMCP, Context # use FastMCP 2.0

# from mcp.server.fastmcp import FastMCP, Context
from fastmcp import FastMCP, Context # use FastMCP 2.0
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Import of 'Context' is not used.

Suggested change
from fastmcp import FastMCP, Context # use FastMCP 2.0
from fastmcp import FastMCP # use FastMCP 2.0

Copilot uses AI. Check for mistakes.
@kevinbackhouse kevinbackhouse marked this pull request as ready for review January 26, 2026 22:06
@kevinbackhouse
Copy link
Copy Markdown
Collaborator Author

Some of the comments here are valid, but they correspond to other linter checks which I want to fix in separate PRs. For example, I'll do a separate PR to remove unused imports.

@kevinbackhouse kevinbackhouse merged commit 37fc28f into GitHubSecurityLab:main Jan 27, 2026
15 checks passed
@kevinbackhouse kevinbackhouse deleted the fmt branch January 27, 2026 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants